
function filter_uranium35()
    local product  = "green";
    local source   = "black";
    local centri   = "blue";
    local route    = source;
    if event.pin == "white" then
        -- if item is entering through the pin, go to source
    elseif string.find(event.itemstring, "technic:uranium35_dust", 1, true) 
    or string.find(event.itemstring, "technic:uranium0_dust", 1, true) then
        route = product;
    elseif event.item.count % 2 ~= 1 
    and string.find(event.itemstring, "technic:uranium0_dust", 1, true) == nil then 
        -- if item is an even quantity of refinable uranium dust
        route = centri;
    end
    return route;
end

if event.type == "item" then
    return filter_uranium35()
end
